package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.BookGrantInfo;
import com.xmy.cultivate.entity.request.BookGrantInfoRs;
import com.xmy.cultivate.mapper.BookGrantInfoMapper;
import com.xmy.cultivate.service.IBookGrantInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 发放记录表 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2025-02-10
 */
@Service
public class BookGrantInfoServiceImpl extends ServiceImpl<BookGrantInfoMapper, BookGrantInfo> implements IBookGrantInfoService {

    @Autowired
    @Lazy
    BookGrantInfoMapper bookGrantInfoMapper;

    @Override
    public List<BookGrantInfo> getGrantLog(Integer yearPart,
                                           Integer quarterNum,
                                           Long schoolId,
                                           Long subjectsId,
                                           Long grantId,
                                           Integer status,
                                           Integer limitCount) {
        return bookGrantInfoMapper.getGrantLog(yearPart, quarterNum, schoolId, subjectsId, grantId, status, limitCount);
    }


    @Override
    public List<BookGrantInfoRs> getGrantLogDetail(Integer yearPart,
                                                   Integer quarterNum,
                                                   Long schoolId,
                                                   Long subjectsId,
                                                   Long teacherId,
                                                   Integer status,
                                                   Long bookTextId,
                                                   String createdAt,
                                                   Integer bookTextType,
                                                   Long classTypeId,
                                                   String yearClassId,
                                                   Integer lessonNum,
                                                   String studentName,
                                                   String gradeId,
                                                   Integer isDetails
    ) {
        return bookGrantInfoMapper.getGrantLogDetail(yearPart, quarterNum, schoolId, subjectsId, teacherId, status, bookTextId, createdAt, bookTextType, classTypeId, yearClassId, lessonNum, studentName, gradeId, isDetails);
    }

    @Override
    public List<BookGrantInfoRs> getGrantLogDetailPaper(Integer yearPart,
                                                        Integer quarterNum,
                                                        Long schoolId,
                                                        Long subjectsId,
                                                        Long teacherId,
                                                        Integer status,
                                                        String createdAt) {
        return bookGrantInfoMapper.getGrantLogDetailPaper(yearPart, quarterNum, schoolId, subjectsId, teacherId, status, createdAt);
    }

    @Override
    public List<BookGrantInfo> getGrantPaperLog(Integer yearPart,
                                                Integer quarterNum,
                                                Long schoolId,
                                                Long subjectsId,
                                                Long grantId,
                                                Integer status,
                                                Integer limitCount) {
        return bookGrantInfoMapper.getGrantPaperLog(yearPart, quarterNum, schoolId, subjectsId, grantId, status, limitCount);
    }
}
